
from functools import lru_cache

from pydantic.v1 import BaseSettings


class Settings(BaseSettings):
    baidu_client_id: str = "JwHQkk0QgGt0FNbJ6BPnJeru"
    baidu_client_secret: str = "Q9S2NQUoIT7cJHB2wvb1192jPtuXcAuC"
    baidu_chat_url: str = "https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/completions"
    baidu_token_url: str = "https://aip.baidubce.com/oauth/2.0/token"
    baidu_draw_id: str = "mozDYFvj8beprPVA4nxL5509"
    baidu_draw_secret: str = "W9DQjgZNXxceiHU1sF4DbSiOG2yYtpy0"
    baidu_draw_url: str = "https://aip.baidubce.com/rpc/2.0/ernievilg/v1/txt2img"
    baidu_draw_result_url: str = "https://aip.baidubce.com/rpc/2.0/ernievilg/v1/getImg"

    class Config:
        env_file = ".env"


@lru_cache
def get_settings():
    return Settings()
